package cn.wolfcode.ssm.mapper;

import cn.wolfcode.ssm.domain.Role;
import cn.wolfcode.ssm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);


    List<Role> selectForResult(QueryObject qo);

    //建立角色与权限之间的关系
    void insertRelation(@Param("rid") Long rid, @Param("pid") Long pid);
    //删除角色与权限之间的关系
    void deleteRelation(Long id);

    List<String> selectRoleSnsByEmpId(Long id);
}